<?php

Yii::import('common.models._base.BaseEmailTemplate');

class EmailTemplate extends BaseEmailTemplate {

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public function rules() {
        return array(
            array('template_id,name,subject,body,status', 'required'),
            array('status, lang, template_id', 'numerical', 'integerOnly' => true),
            array('name, subject', 'length', 'max' => 45),
            array('name, subject, body, status, lang', 'default', 'setOnEmpty' => true, 'value' => null),
            array('id, name, subject, body, status, lang, template_id', 'safe', 'on' => 'search'),
        );
    }

    public static function label($n = 1) {
        return Yii::t('app', 'Email Template|Email Templates', $n);
    }

}